$(document).ready(function(){
	$("#changepass_form").validate({
		rules: {			
			password: "required"			
	   	},
		submitHandler: function(form) {
			$(form).ajaxSubmit(function(data){
				var responseData = eval('('+data+')');
				$("#admin").html("");
				if (responseData.sucess){
					$("#admin").append("<p>"+responseData.message[0]+"</p>");
					$("#admin").append("<p>Wait 3 seccon</p>");
					setTimeout("window.location.href = LOGOUT_URL",3000);
				}else{
					for(i=0,iLen = responseData.message.length;i<iLen;i++){
						$("#admin").append("<p>"+responseData.message[i]+"</p>");
					}
				}
			});
		}
	});
});	
